<?php

use yii\helpers\Html;
use \kartik\detail\DetailView;

/* @var $this yii\web\View */
/* @var $model common\models\User */

$this->title = $model->getPublicIdentity();
$this->params['breadcrumbs'][] = ['label' => Yii::t('backend', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="user-view">

    <p>
        <?php echo Html::a(Yii::t('backend', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?php
        echo Html::a(Yii::t('backend', 'Delete'), ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => Yii::t('backend', 'Are you sure you want to delete this item?'),
                'method' => 'post',
            ],
        ])
        ?>
    </p>

    <?php
    echo DetailView::widget([
        'model' => $model,
        'condensed' => true,
        'mode' => DetailView::MODE_VIEW,
        'hover' => true,
        'attributes' => [
            ['columns' => [
                    [
                        'attribute' => 'id',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                    [
                        'attribute' => 'username',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
//                    [
//                        'attribute' => 'logged_at',
//                        'labelColOptions' => ['style' => 'width:14%'],
//                        'valueColOptions' => ['style' => 'width:16%'],
//                    ],
                ],
            ], // end columns
            ['columns' => [
                    [
                        'attribute' => 'email',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                    [
                        'attribute' => 'status',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                    [
                        'attribute' => 'created_time',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                ],
            ], // end columns
            ['columns' => [
                    [
                        'attribute' => 'updated_at',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                    [
                        'attribute' => 'auth_key',
                        'labelColOptions' => ['style' => 'width:14%'],
                        'valueColOptions' => ['style' => 'width:16%'],
                    ],
                ],
            ], // end columns
        ],
    ])
    ?>

</div>
